<template>
	<!-- 个人清单信息 -->
	<view class="box">
		<baseHead title="个人信息收集清单" bg="#ffffff" color="#000000"></baseHead>
		<view class="content">
			<view class="content-box" v-for="(item,index) in ListData" :key="index">
				<view class="title">{{item.title}}</view>
				<view class="content-text">
					<view class="text-left">使用目的</view>
					<view class="text-right">{{item.mudi}}</view>
				</view>
				<view class="content-text">
					<view class="text-left">收集场景</view>
					<view class="text-right">{{item.changjing}}</view>
				</view>
				<view class="content-text">
					<view class="text-left">收集情况</view>
					<view class="text-right">{{item.qingkuang}}</view>
				</view>
				<view class="content-text">
					<view class="text-left">收集明细</view>
					<view class="text-right">{{item.mingxi}}</view>
				</view>
				<view class="content-text">
					<view class="text-left">收集内容</view>
					<view class="text-xiangqing" @click="onclick(item)">查看详情</view>
					<u-icon size="14" color="#1684FC" name="arrow-right"></u-icon>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import baseHead from '@/pages/component/baseHead.vue'
	export default {
		data() {
			return {
				ListData: [{
						id: 1,
						title: "个人信息",
						mudi: "个人信息及在线简历的展示",
						changjing: "编辑个人信息时",
						qingkuang: '',
						mingxi: '头像、姓名、出生日期、性别、所在城市、手机号、邮箱、当前身份、微信号、参加工作时间',
						neirong: '/pages/views/packageB/type-jobhunting/resume/edit/basic?type=2'
					},
					{
						id: 2,
						title: "求职意向",
						mudi: "在线简历的展示及相关职位推荐",
						changjing: "简历创建及修改求职意向时",
						qingkuang: '',
						mingxi: '求职意向',
						neirong: '/pages/views/packageB/type-jobhunting/jobIntention'
					},
					{
						id: 3,
						title: "工作履历",
						mudi: "在线简历的展示和投递",
						changjing: "简历创建及修改工作经历、修改项目经历时",
						qingkuang: '已收集',
						mingxi: '工作经历、项目经历收集明细',
						neirong: '/pages/views/packageB/type-jobhunting/resume/resume'
					},
					{
						id: 4,
						title: "教育经历",
						mudi: "在线简历的展示和投递",
						changjing: "简历创建及修改教育经历时",
						qingkuang: '',
						mingxi: '教育经历',
						neirong: '/pages/views/packageB/type-jobhunting/resume/resume'
					},
					{
						id: 5,
						title: "项目经历",
						mudi: "项目经历的展示和投递",
						changjing: "简历创建及修改项目经历时",
						qingkuang: '',
						mingxi: '项目经历',
						neirong: '/pages/views/packageB/type-jobhunting/resume/resume'
					},
					{
						id: 6,
						title: "附件简历",
						mudi: "生成在线简历及附件简历的展示",
						changjing: "上传附件简历",
						qingkuang: '',
						mingxi: '附件简历',
						neirong: '/pages/views/packageB/type-jobhunting/enclosure'
					},
					{
						id: 7,
						title: "账号信息",
						mudi: " 用户注册及个人资料展示",
						changjing: "用户绑定手机号时",
						qingkuang: '',
						mingxi: '手机号',
						neirong: '/pages/views/packageB/type-jobhunting/jibenshezhi/jibenziliao/index'
					},
				],
				mylistdata: [],
				myinfo: []
			}
		},
		components: {
			baseHead
		},
		onReachBottom() {},
		created() {
			this.getResums()
		},
		methods: {
			onclick(item) {
				uni.navigateTo({
					url: item.neirong
				})
			},
			getResums() {
				this.$http.huirc.resumemy().then(res => {
					if (res.Success) {
						res = res.Result;
						this.mylistdata = res;
						console.log(res);
						//处理数据
						// this.resumeList[0].data = res.BaseInfo; //基本信息
						// this.resumeList[1].data = res.JobExpects; //求职意向  
						// this.resumeList[2].data = res.WorkExps; //工作/实习经
						// this.resumeList[3].data = res.EducationExps; //教育经历
						// this.resumeList[4].data = res.GoodAtInfo; //个人优势
						// this.resumeList[5].data = res.ProjectExps; //项目经历 
						// this.resumeList[6].data = res.TrainExp; //培训经历 
						// this.resumeList[7].data = res.LangSkills; //语言能力 
						// this.resumeList[8].data = res.ProSkills; //专业技能 
						// this.resumeList[9].data = res.Certificates; //证书 
						//	this.resumeList[10].data = res.t_bs_gerenzuopingbiao; //个人作品
						console.log(this.mylistdata);

						// this.mylistdata.
					}
				}).then(res => {
					this.$http.core.myinfo().then(res => {
						if (res.Code == 0 && res.Success) {
							console.log(res)
							this.myinfo = res.Result
						}
					})
				}).then(res => {
					this.ListData.forEach(item => {
						if (item.id == 1) {
							item.qingkuang = this.mylistdata.BaseInfo ? '已收集' : '未收集'
						}
						if (item.id == 2) {
							item.qingkuang = this.mylistdata.JobExpects ? '收集' + this.mylistdata.JobExpects
								.length + '条' : '未收集'
						}
						if (item.id == 3) {
							item.qingkuang = this.mylistdata.WorkExps ? '已收集' : '未收集'
						}
						if (item.id == 4) {
							item.qingkuang = this.mylistdata.EducationExps ? '已收集' : '未收集'
						}
						if (item.id == 5) {
							item.qingkuang = this.mylistdata.ProjectExps ? '已收集' : '未收集'
						}
						if (item.id == 6) {
							item.qingkuang = this.mylistdata.Attachs ? '收集' + this.mylistdata.Attachs
								.length + '条' : '未收集'
						}
						if (item.id == 7) {
							item.qingkuang = this.myinfo ? '已收集' : '未收集'
						}
					})
				})
			},


		}
	}
</script>
<style>
	page {
		background-color: #fff;
	}
</style>
<style lang="scss" scoped>
	.content {
		.content-box {
			padding: 30rpx;
			border-bottom: 1px solid #e5e5e5;

			.title {
				font-size: 28rpx;
				font-weight: 600;
			}

			.content-text {
				display: flex;
				justify-content: flex-start;

				.text-left {
					font-size: 28rpx;
					color: #999999;
					margin: 10rpx 20rpx 10rpx 0;
					width: 120rpx;
				}

				.text-right {
					font-size: 28rpx;
					margin: 10rpx 0rpx 10rpx 0;
					width: 80%;
				}

				.text-xiangqing {
					font-size: 28rpx;
					margin: 10rpx 0rpx 10rpx 0;
					color: #1684FC;
					// width: 90%;
				}
			}
		}
	}
</style>